package day0531;

import java.util.Scanner;

public class File8 {
    public static void main(String[] args) {
        Scanner s=new Scanner(System.in);
        System.out.println("请输入a1的值：");
        int a1=s.nextInt();
        System.out.println("请输入a2的值：");
        int a2=s.nextInt();
        System.out.println("请输入一个运算符(+  -  *  /)：");
        String ope=s.next();
        switch (ope){
            case "+" :System.out.println(a1+a2);break;
            case "-" :System.out.println(a1-a2);break;
            case "*" :System.out.println(a1*a2);break;
            case "/" :System.out.println(a1/a2);break;
            default:System.out.println("您输入的符号无效,请重试"); break;
        }

    }
}






/*
        if(!ope.equals("+") && !ope.equals("-") && !ope.equals("*") && !ope.equals("/")){
                System.out.println("您输入的符号无效,请重试");
                return;
        }*/
